package com.dayu.finecomm.mongo.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.mongodb.BasicDBObject;

/**
 * mongo pojo基础类
 * 
 * @author Chenjiawei
 *
 *         2017年7月11日
 */
public class Basic<T extends Basic<T>> extends BasicDBObject {

	@JSONField(serialize = false)
	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@JSONField(serialize = false)
	public static final String FIELD_ID = "_id";

	/**
	 * 时间戳
	 */
	@JSONField(serialize = false)
	public static final String FIELD_TIME = "time";

	public String get_id() {

		return getString(FIELD_ID);
	}

	public void set_id(String _id) {
		put(FIELD_ID, _id);
	}

	public Long getTime() {
		return getLong(FIELD_TIME);
	}

	public void setTime(int time) {

		put(FIELD_TIME, time);
	}

}
